import useSWR from 'swr';
import { fetchMonitorInfo } from '@/service/monitor';

function useFetchMonitorInfoSwr(mid: number) {
  return useSWR(mid ? ['/monitorInfo', mid] : null, (url, mid) => {
    return fetchMonitorInfo(mid);
  });
}

export default useFetchMonitorInfoSwr;
